﻿using Styx.TreeSharp;


namespace TuanHA_Combat_Routine
{
    public partial class Classname
    {
        #region Holy Rotation

        private static Composite HolyRotation()
        {
            return new PrioritySelector(
                MovementMoveToLoS(ret => Me.CurrentTarget),
                MovementMoveStop(ret => Me.CurrentTarget, 10),
                //Heal Rotation Here
                DivineShield(),
                //Rebuke(),
                //ArcaneTorrent(),
                UseHealthStoneHP(),
                UseBattleStandard(),
                LayonHands(),
                DivineProtection(),
                BeaconHealFirstUnit(),
                HandofProtectionFriendRemoveCC(),
                HandofProtectionFriend(),
                HandofProtectionMe(),
                DevotionAura(),
                HandofPurity(),
                CrowdControlHPSurviveComp(),
                new Decorator(
                    ret =>
                    UnitHeal != null &&
                    UnitHeal.IsValid &&
                    UnitHeal.HealthPercent <= THSettings.Instance.UrgentHeal,
                    new PrioritySelector(
                        HolyAvenger(),
                        AvengingWrath(),
                        DivineFavor(),
                        GuardianofAncientKingsHoly(),
                        DivineLightBubble(),
                        FlashofLightBubble(),
                        HolyPrism(),
                        LightHammer(),
                        ExecutionSentence(),
                        WordofGlory(),
                        LightofDawn(),
                        EternalFlameTank(),
                        EternalFlame(),
                        EternalFlameBlanket(),
                        FlashofLightSelflessHealer(),
                        SacredShieldHoly(),
                        JudgmentSelflessHealerHoly(),
                        HolyShock(),
                        //HammerofJustice(),
                        //BlindingLight(),
                        HolyRadiance(),
                        DivineLightProc(),
                        FlashofLight(),
                        DivineLight(),
                        HandofSalvation(),
                        DivinePlea(),
                        HolyLight()
                        //CleanseFriendlyASAPComp()
                        )),
                new Decorator(
                    ret =>
                    UnitHeal != null &&
                    UnitHeal.IsValid &&
                    UnitHeal.HealthPercent > THSettings.Instance.UrgentHeal
                    && UnitHeal.HealthPercent <= THSettings.Instance.PriorityHeal,
                    new PrioritySelector(
                        ReckoningPvPComp(),
                        HolyAvenger(),
                        AvengingWrath(),
                        DivineFavor(),
                        GuardianofAncientKingsHoly(),
                        //HammerofJustice(),
                        //BlindingLight(),
                        DivineLightBubble(),
                        FlashofLightBubble(),
                        HolyPrism(),
                        LightHammer(),
                        ExecutionSentence(),
                        WordofGlory(),
                        LightofDawn(),
                        EternalFlameTank(),
                        EternalFlame(),
                        EternalFlameBlanket(),
                        FlashofLightSelflessHealer(),
                        SacredShieldHoly(),
                        JudgmentSelflessHealerHoly(),
                        HolyShock(),
                        CleanseFriendlyASAPComp(),
                        AttackASAPRotationInstantComp(),
                        TurnEvilASAPComp(),
                        HammerofWrathUnitHammerofWrath(),
                        //WarStomp(),
                        HolyRadiance(),
                        DivineLightProc(),
                        FlashofLight(),
                        DivineLight(),
                        HandofSalvation(),
                        DivinePlea(),
                        HolyLight(),
                        HandofFreedomFriend(),
                        HandofFreedomMyselfHoly(),
                        HandofSacrificeFriend(),
                        CleanseMe()
                        )),
                new Decorator(
                    ret => UnitHeal != null &&
                           UnitHeal.IsValid &&
                           UnitHeal.HealthPercent > THSettings.Instance.PriorityHeal,
                    new PrioritySelector(
                        ReckoningPvPComp(),
                        //HammerofJustice(),
                        //BlindingLight(),
                        CleanseFriendlyASAPComp(),
                        AttackASAPRotationInstantComp(),
                        HammerofWrathCurrentTarget(),
                        HammerofWrathUnitHammerofWrath(),
                        AttackASAPRotationCastComp(),
                        CleanseMe(),
                        TurnEvilASAPComp(),
                        HandofFreedomFriend(),
                        HandofFreedomMyselfHoly(),
                        HandofSacrificeFriend(),
                        TurnEvilComp(),
                        AttackRotationHolyInstantComp(),
                        RepentanceComp(),
                        CrusaderStrikeHoly(),
                        HolyAvenger(),
                        AvengingWrath(),
                        DivineFavor(),
                        GuardianofAncientKingsHoly(),
                        SpeedofLight(),
                        DivineLightBubble(),
                        FlashofLightBubble(),
                        HolyPrism(),
                        LightHammer(),
                        ExecutionSentence(),
                        WordofGlory(),
                        LightofDawn(),
                        EternalFlameTank(),
                        EternalFlame(),
                        EternalFlameBlanket(),
                        FlashofLightSelflessHealer(),
                        SacredShieldHoly(),
                        JudgmentSelflessHealerHoly(),
                        HolyShock(),
                        //WarStomp(),
                        AttackRotationHolyCastComp(),
                        HolyRadiance(),
                        DivineLightProc(),
                        FlashofLight(),
                        DivineLight(),
                        HandofSalvation(),
                        DivinePlea(),
                        HolyLight(),
                        CleanseFriendlyComp(),
                        BuffRotation(),
                        SealofInsight(),
                        RighteousFury()
                        )
                    ),
                AutoRez());
            //WriteDebug(""));
        }

        #endregion
    }
}